import axios from "axios";
// get categories
export
    const apiGetCate = function () {
        return axios({
            method: "get",
            url: `categories`,
        })
    }

// add goods
export
    const apiAddGoods = function (data) {
        return axios({
            method: "post",
            url: `goods`,
            data: data
        })
    }

// get 商品动态或者静态参数
export
    const apiGetGoodsAttr = function (id, sel) {
        return axios({
            method: "get",
            url: `categories/${id}/attributes`,
            params: {
                sel: sel
            }
        })
    }

// 图片上传地址
export const IMGUPLOADURL = `http://127.0.0.1:8888/api/private/v1/upload`